import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqRewardHelper } from "../Public/SeqRewardHelper";
import { SPetInfo } from "./SPetInfo";
type int = number;
//class SPlayerPetArenaEx
    
    export  class SPlayerPetArenaEx extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPlayerPetArenaEx();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.rank);
            arg1.writeInt(this.lastRank);
            arg1.writeInt(this.historyRank);
            arg1.writeInt(this.win);
            arg1.writeInt(this.histroyWin);
            arg1.writeInt(this.rewardStatus);
            arg1.writeDate(this.canGetRewardTime);
            arg1.writeDate(this.canRefreshTime);
            arg1.writeBool(this.insurance);
            SeqRewardHelper.write(arg1, this.rewards);
            SeqRewardHelper.write(arg1, this.insuranceRewards);
            this.petInfo.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.rank = arg1.readInt();
            this.lastRank = arg1.readInt();
            this.historyRank = arg1.readInt();
            this.win = arg1.readInt();
            this.histroyWin = arg1.readInt();
            this.rewardStatus = arg1.readInt();
            this.canGetRewardTime = arg1.readDate();
            this.canRefreshTime = arg1.readDate();
            this.insurance = arg1.readBool();
            this.rewards = SeqRewardHelper.read(arg1);
            this.insuranceRewards = SeqRewardHelper.read(arg1);
            this.petInfo = new SPetInfo();
            this.petInfo.__read(arg1);
            return;
        }

        public /* const */_type: int=12407;

        public /* var */rank: int;

        public /* var */lastRank: int;

        public /* var */historyRank: int;

        public /* var */win: int;

        public /* var */histroyWin: int;

        public /* var */rewardStatus: int;

        public /* var */canGetRewardTime: Date;

        public /* var */canRefreshTime: Date;

        public /* var */insurance: Boolean;

        public /* var */rewards: Array<any>;

        public /* var */insuranceRewards: Array<any>;

        public /* var */petInfo: SPetInfo;

        public static /* var */_regist: SPlayerPetArenaEx;
    }

            SPlayerPetArenaEx._regist = new SPlayerPetArenaEx(true);
        